function connectWebSocketServerOnComment(account) {
    if (account != null && account.length > 0) {
        var socket = new WebSocket("ws://localhost:8080/admin/socket/comment/" + account);
        socket.onmessage = function (ev) {
            try {
                var resultData = JSON.parse(ev.data);
                var unreadCommentCount = resultData["unreadCommentCount"];
                if (unreadCommentCount != null && !isNaN(unreadCommentCount)) {
                    $(".unread-comment").text(unreadCommentCount);
                }
            } catch (e) {
                console.log(ev.data);
            }
        }
    }

    function send() {
        var unreadCount = $.get("/comment/unread/count");
        console.log(unreadCount);
    }
}
